package puziran.sofa.http.client;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class HttpPropertyUtilNew {
	private static String propertyFileName = "config/serviceHostNew";
	private static ResourceBundle resourceBundle = null;

	public static ResourceBundle getResourceBundle() {
		if (resourceBundle == null) {
			resourceBundle = ResourceBundle.getBundle(propertyFileName);
		}
		return resourceBundle;
	}

	public static String getValue(String key) {
		if ((key == null) || (key.equals("")) || (key.equals("null"))) {
			return "";
		}
		String result = "";
		try {
			result = getResourceBundle().getString(key);
		} catch (MissingResourceException e) {
			e.printStackTrace();
		}
		return result;
	}
}